Streaming data, such as video and/or audio data, to end users or to clients over the internet in real time combines the concept of buffered real-time playback with compression of the data. The internet protocol (IP) is often used with the transmission control protocol (TCP) for the transmission of the data in real time, wherein data on an IP network is organized into packets. However, when packets are being transmitted across a network, packet loss may occur wherein one or more of the packets may fail to reach their destination. Transmission of one or more of the packets may also be delayed. Packet loss or delay can be caused by a number of factors, such as signal degradation over a network medium, rejection of corrupted packets in-transit, faulty networking hardware, or faulty network drivers. Moreover, streaming real-time video and/or audio data to clients over TCP may be difficult because routers may drop or delay packets when they become congested. As a result of dropped and/or delayed packets, real-time playback may not be feasible when using TCP.
In addition, due to the in-order delivery of packets provided by TCP, any missing packet must be retransmitted, inserted in the proper position within the receive queue, and released to an application. During the retransmission of a packet, a TCP retransmit timeout period occurs and a full network round-trip to obtain the missing packet occurs. As such, the retransmission time for a packet may be lengthy. In light of the length for the retransmission time, a significant delay of data may be induced. Further, with streaming video and/or audio data in real time, by the time the data is available, it may be stale and it may need to be discarded. For example, when a packet loss occurs and results in a delay with receiving video or audio data, such as a one second delay, the client may need to skip one second of playing time for the video or audio in order for the client to return to its normal state of buffering/latency.
In view of some of these problems, at least some real-time video and/or audio streaming technologies use the user datagram protocol (UDP) to transmit data to clients in real time. When using UDP, computer applications can transmit messages to other hosts on an IP network without having to establish prior communication for special transmission channels or data paths. More specifically, UDP is suitable for purposes where error checking and correction is not necessary, or where the error checking is performed in the application. Time-sensitive applications often use UDP because dropping packets is preferable to waiting for delayed packets, which may not be an option in a real-time system. However, UDP is not universally available. For example, UDP is not supported by many firewalls and proxies, and UDP is not available to browser-based applications (i.e., web applications). More specifically, browser-based applications are limited to using TCP.